package com.jar.exercise.设计模式.工厂.工厂方法.factory;

import com.jar.exercise.设计模式.工厂.工厂方法.pojo.CocoCola;
import com.jar.exercise.设计模式.工厂.工厂方法.pojo.Cola;

public class CocoColaFactory extends ColaFactory {
    @Override
    public Cola createCola(Class<? extends Cola> cola) {
        if (cola.getName().equals(CocoCola.class.getName())) {
            return new CocoCola();
        }
        return null;
    }
}
